<template>
  <div class="notice-detail">
    <el-form v-if="form" ref="form" :model="form" label-width="140px">
      <el-card class="box-card">
        <div slot="header" class="clearfix">
          <span>管理制度详情</span>
        </div>
        <h2 style="text-align: center;">{{form.title }}</h2>
        <h5 v-if="form.content">简介：</h5>
        <div v-if="form.remark">
          <p v-html="form.remark"></p>
        </div>
        <h5 v-if="form.content">内容：</h5>
        <div v-if="form.content">
          <p v-html="form.content"></p>
        </div>
        <div v-if="form.enclosurePath" class="down-file">
          <a class="document-link" target="_blank" :href="form.enclosurePath" title="查看附件">查看附件</a>
        </div>
      </el-card>
    </el-form>
  </div>
</template>
<script>
  import { getWeightManagement } from "@/api/weight/weightManagement";
  export default {
    data(){
      return{
        // 表单参数
        form: null
      }
    },
    // created(){
    //   this.getDicts("is_over_weight").then(response => {
    //     this.dict_isOverWeight = response.data;
    //   });
    // },
    mounted(){
      this.getNotice()
    },
    methods:{
      //详细信息
      getNotice() {

        const id = this.$route.query.id;
        console.log("id===",id);
        getWeightManagement(id).then(response => {
          this.form = response.data;
        });

      }
    }
  }
</script>
<style lang="scss" scoped>
.notice-detail{
  width: 100%;
  padding: 15px;
  box-sizing: border-box;
  .down-file{
    width: 100%;
    padding: 10px 0;
    box-sizing: border-box;
    a{
      text-decoration: underline;
      font-size: 14px;
      color: rgb(47, 178, 230);
    }
  }
}
</style>



